<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品审核详情</title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background-color:rgb(243,243,243);
        }
    </style>
</head>
<body>
    <div class="box">
        <table id="demoTable" lay-filter="demoTable"></table>
    </div>

    <input type="hidden" name="productId" id="productId"/>

<script>
    layui.use(["jquery","layer","form",'upload','table'],function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var table=layui.table;

        setTimeout(getProductCourseRecord,100);

        function getProductCourseRecord() {
            $.ajax({
                url:"/product/getProductCourseRecord",
                data:{'courseId':$("input[name=productId]").val()},
                type:'post',
                dataType:'json',
                success:function (data) {
                    demoTable(data.data);
                }
            });
        }

        function demoTable(data){
            table.render({
                elem:'#demoTable',
                title:"商品审核详情",
                data:data,
                width:800,
                cols:[[
                    {field:"implementDate",title:"审核时间",align:'center',width:200},
                    {field:"account",title:"审核人员",align:'center',width:200},
                    {field:"result",title:"审核结果",align:'center',width:200,templet:function(data){
                        if(data.result==1){
                            return "审核通过";
                        }else if(data.result==2){
                            return "待审核";
                        }else if(data.result==3){
                            return "审核驳回";
                        }
                    }},
                    {field:"remarks",title:"反馈详情",align:'center',width:195,templet:function(data){
                        if(data.remarks==null){
                            return "无";
                        }else{
                            return data.remarks;
                        }
                    }}
                ]]
            })
        }

    })
</script>
</body>
</html>